<?php
class Services_Controller_Services {
	
	public $template;
	
	public function main(array $getVars, array $postVars){
		
		if(isset($getVars['page'])){
			$serviceModel = new Services_Model_Singleservice;
			$article = $serviceModel->getArticle($getVars, $postVars);
			$this->template = "./services/views/singleservice.php";
		}
		else {
			$serviceModel = new Services_Model_Serviceslist;
			$article = $serviceModel->getArticleList($getVars);
			$this->template = "./services/views/serviceslist.php";
		}
		$view = new Core_Model_View($this->template);
		$view->assign('article', $article);
	}
	
}